import Layout from '@/views/layout/Layout'

const route = {
  path: '/news',
  redirect: '/news/list',
  component: Layout,
  alwaysShow: false,
  meta: {
    title: '新闻管理',
    icon: 'nested'
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/news/list'),
      name: 'NewsList',
      hidden: false,
      meta: { title: '新闻列表' }
    },
    {
      path: 'add',
      component: () => import('@/views/news/add'),
      name: 'NewsAdd',
      hidden: true,
      meta: { title: '添加新闻' }
    },
    {
      path: 'edit/:id',
      component: () => import('@/views/news/edit'),
      name: 'NewsEdit',
      hidden: true,
      props: true,
      meta: { title: '修改新闻' }
    }
  ]
}

export default route
